package com.mycompany.myapp.service.dto;
import java.time.ZonedDateTime;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the {@link com.mycompany.myapp.domain.Commodity} entity.
 */
public class CommodityDTO implements Serializable {

    private Long id;

    private String cname;

    private Integer star;

    private Double price;

    private String imgUrl;

    private String detail;

    private String model;

    private ZonedDateTime createTime;

    private Integer count;

    private String fashion;

    private String quality;

    private String brand;

    private String status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public Integer getStar() {
        return star;
    }

    public void setStar(Integer star) {
        this.star = star;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public ZonedDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(ZonedDateTime createTime) {
        this.createTime = createTime;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getFashion() {
        return fashion;
    }

    public void setFashion(String fashion) {
        this.fashion = fashion;
    }

    public String getQuality() {
        return quality;
    }

    public void setQuality(String quality) {
        this.quality = quality;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        CommodityDTO commodityDTO = (CommodityDTO) o;
        if (commodityDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), commodityDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "CommodityDTO{" +
            "id=" + id +
            ", cname='" + cname + '\'' +
            ", star=" + star +
            ", price=" + price +
            ", imgUrl='" + imgUrl + '\'' +
            ", detail='" + detail + '\'' +
            ", model='" + model + '\'' +
            ", createTime=" + createTime +
            ", count=" + count +
            ", fashion='" + fashion + '\'' +
            ", quality='" + quality + '\'' +
            ", brand='" + brand + '\'' +
            ", status='" + status + '\'' +
            '}';
    }
}
